<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta name="format-detection" content="telephone=no" />
    <title>资讯详情</title>
    <link rel="stylesheet" href="../../css/reset.css" />
    <style>
        body {
            width: 100%;
            background-color: #fff;
            font-size: 0.28rem;
            height: auto;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            font-family: PingFang-SC-Medium;
            color: #262626;
            padding-bottom: 0.5rem;
        }

        header {
            width: 100%;
            padding: 0.24rem 0.3rem 0.2rem 0.3rem;
            height: 2.84rem;
            box-sizing: border-box;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: space-between;
            box-shadow: 0 0.06rem 0.12rem 0 rgba(198, 198, 198, 0.23);
        }

        header h1 {
            width: 100%;
            font-size: 0.4rem;
            font-family: PingFang-SC-Bold;
            font-weight: bold;
            box-sizing: border-box;
            display: flex;
            display: -webkit-flex;
            align-items: center;
        }

        header p {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            margin: 0.3rem 0;
        }

        header p>span {
            width: 100%;
            font-size: 0.24rem;
            font-family: PingFang-SC-Medium;
            font-weight: 500;
            margin-left: 0.17rem;
        }

        header p>img {
            width: 0.42rem;
        }

        header b {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
        }

        header b>span:first-of-type {
            font-size: 0.22rem;
            font-family: PingFang-SC-Medium;
            font-weight: 500;
            color: #71768C;
        }

        header b>span:last-of-type {
            flex: 1;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-end;
        }

        header .showclickNum>span:first-of-type {
            color: #71768C;
        }

        header b>span:last-of-type>span:last-of-type img {
            /*width: 0.36rem;*/
            height: 0.3rem;
        }

        .careImg {
            height: 0.3rem;
        }

        header .showclickNum>span:last-of-type {
            width: 0.8rem;
            box-sizing: border-box;
            padding-left: 0.2rem;
            margin-left: 0.36rem;
        }

        article {
            width: 100%;
            box-sizing: border-box;
            padding: 0.5rem 0.3rem;
        }

        article img {
            max-width: 100% !important;
        }

        footer {
            width: 6.9rem;
            margin-left: calc((100% - 6.9rem) / 2);
            background-color: #F8F8F8;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            justify-content: center;
            box-sizing: border-box;
            color: #71768C;
            font-size: 0.23rem;
            padding: 0.5rem 0.28rem;
            height: auto;
            overflow: hidden;
        }

        footer div {
            width: 100%;
            background-color: #F8F8F8;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            justify-content: flex-start;
            margin-bottom: 0.33rem;
        }

        footer div b {
            font-weight: normal;
        }

        footer>p {
            line-height: 0.4rem;
        }
    </style>
</head>

<body>
    <header>
        <h1 class="textHead"></h1>
        <p>
            <!-- <img class="author_header" src="../../image/user_img.png"> -->
            <span class="author_name"></span>
        </p>
        <b>
            <span class="create_at"></span>
            <span class="showclickNum" style="display: flex;display:-webkit-flex;align-items: center;">
                <span>
                    <span>
                        <img src="../../image/eyesicon.png" alt="" class="careImg">
                    </span>
                    <span class="agreeNum"></span>
                </span>
                <span class="shareWx">
                    <img src="../../image/hlshare.png" alt="" class="shareBtn">
                </span>
            </span>
        </b>
    </header>
    <article>
        <div class="showMain content">
        </div>
    </article>
    <footer style="display: none;">
        <p>
            免责声明： 转载此文为传递更多市场信息，不代表人人矿场的
            观点和立场，请自行参考
        </p>
    </footer>


    <script src="../../script/autosize.js"></script>
    <script src="../../script/fastclick.js"></script>
    <script src="../../script/jquery_three_two_one.js"></script>
    <script src="../../script/dotmin.js"></script>
    <script src="../../script/app.js"></script>
    <script>
        apiready = function () {
            var app = new APP();
            app.handlePage();
            var account = app.getAccount();
            var newsId = api.pageParam.id;
            var goodimg = new Image();
            goodimg.src = api.wgtRootDir + '/image/isgoodicon.png';
            app.ajaxPro({
                url: "article/get",
                values: {
                    id: newsId,
                    token: account ? account.token : ""
                },
                openFlower: true
            }, function (ret) {
                $(".author_name").text(ret.data.author_name)
                $(".textHead").text(ret.data.title);
                $(".agreeNum").text(ret.data.reading);
                if (ret.data.footer_is_show == 1) {
                    if (ret.data.footer_content) {
                        $('footer').show();
                        $('footer>p').text(ret.data.footer_content);
                    }
                }
                $(".showMain").html(ret.data.content);
                $(".create_at").text(ret.data.create_at);
                $(".shareWx").click(function () {
                    var userConfig = {
                        recommendTitle: ret.data.title,
                        recommendText: ret.data.face_content,
                        recommendUrl: ret.data.wap_url,
                        recommendImg: "widget://res/web/images/shareicon.png"
                        // recommendImg2: app.config.host + "/templates/default/images/app/wxPlus-share-recommend.jpg" //QQ这逗逼必须分享网络图片
                    };
                    var param = {
                        dtype: "dialog9",
                        data: {
                            title: "",
                            text: "",
                            btns: [{
                                name: "取消",
                                event: "cancel"
                            }],
                            lis: [{
                                name: "微信",
                                event: "click",
                                index: 0
                            },
                            {
                                name: "朋友圈",
                                event: "click",
                                index: 1
                            },
                            {
                                name: "QQ",
                                event: "click",
                                index: 2
                            },
                            {
                                name: "新浪微博",
                                event: "click",
                                index: 3
                            }
                            ],
                            extra: {}
                        }
                    };
                    app.dialog(param);
                    var wxMd, qqMd, sinaMd;
                    app.listen("click", function (ret, err) {
                        var index = ret.value.index;
                        app.log("click_index", index);
                        switch (index) {
                            case 0:
                                if (!wxMd) {
                                    wxMd = api.require("wxPlus");
                                }
                                //检测是否装有微信
                                wxMd.isInstalled(function (r, e) {
                                    if (r.installed) {
                                        wxMd.shareWebpage({
                                            scene: "session",
                                            title: userConfig.recommendTitle,
                                            description: userConfig.recommendText,
                                            thumb: userConfig.recommendImg,
                                            contentUrl: userConfig.recommendUrl
                                        },
                                            function (r, e) {
                                                if (r.status) {
                                                    app.toast("分享成功");
                                                } else {
                                                    app.toast("分享失败");
                                                }
                                            }
                                        );
                                    } else {
                                        app.toast("当前设备未安装微信客户端");
                                    }
                                });
                                break;
                            case 1:
                                if (!wxMd) {
                                    wxMd = api.require("wxPlus");
                                }
                                //检测是否装有微信
                                wxMd.isInstalled(function (r, e) {
                                    if (r.installed) {
                                        wxMd.shareWebpage({
                                            scene: "timeline",
                                            title: userConfig.recommendTitle,
                                            description: userConfig.recommendText,
                                            thumb: userConfig.recommendImg,
                                            contentUrl: userConfig.recommendUrl
                                        },
                                            function (r, e) {
                                                if (r.status) {
                                                    app.toast("分享成功");
                                                } else {
                                                    app.toast("分享失败");
                                                }
                                            }
                                        );
                                    } else {
                                        app.toast("当前设备未安装微信客户端");
                                    }
                                });
                                break;
                            case 2:
                                if (!qqMd) {
                                    qqMd = api.require("qq");
                                }
                                qqMd.installed(function (ret, err) {
                                    if (ret.status) {
                                        qqMd.shareNews({
                                            url: userConfig.recommendUrl,
                                            title: userConfig.recommendTitle,
                                            description: userConfig.recommendText,
                                            imgUrl: userConfig.recommendImg2,
                                            type: "QFriend"
                                        },
                                            function () {
                                                //android不支持回调
                                            }
                                        );
                                    } else {
                                        app.toast("当前设备未安装QQ");
                                    }
                                });
                                break;
                            case 3:
                                if (!sinaMd) {
                                    sinaMd = api.require("weibo");
                                }
                                sinaMd.shareWebPage({
                                    title: userConfig.recommendTitle,
                                    text: userConfig.recommendText,
                                    thumb: userConfig.recommendImg,
                                    contentUrl: userConfig.recommendUrl
                                },
                                    function (r, e) {
                                        if (r.status) {
                                            app.toast("分享成功");
                                        } else {
                                            app.toast("分享失败");
                                        }
                                    }
                                );
                                break;
                        }
                    });
                })
            })
            app.headerMap();
        };
    </script>
</body>

</html>